<%-- 
    Document   : portal
    Created on : 02-jul-2012, 19:43:09
    Author     : chema
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Bienvenido, ${portalForm.nombre}</title>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript"></script>
        <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-lightness/jquery-ui.css" rel="stylesheet" type="text/css">
        <script src="portal.js"  type="text/javascript"></script>
        <script>
            $(document).ready(function () {
                // alert('Cargada');
                cargarBase($('idUsu').val());
                 
            });
             
    var URL_CARGARPORTAL = "${pageContext.request.contextPath}/portal/cargarBase.do"

            function cargarBase(idBase)
            {
                $.ajax
                ({
                    url: URL_CARGARPORTAL,
                    type: "POST",
                    data: "{idBase = "+idBase+"}",
                    contentType: "json",
                    success: function(msg) 
                    {
                        if(msg)
                        {
                            $('#contenido').html('<p>'+msg+'</p>');
                        }
                    },
                    fail: function (jqXHR, textStatus)
                    {
                        alert(jqXHR);
                        alert(textStatus);
        
        
                    
                    }
        
                });
    
            }


             
             
             
        </script>
    </head>

    <body>

        <input type="hidden" value="${portalForm.idUsurio}" id="idUsu">
        <span> ${portalForm.nombre} - ${portalForm.nombreHermandad} <br/></span>
        <!--<table width="1149" height="349" border="1">-->
        <table width="1149" height="349" border="1">
            <tr style="vertical-align:top">
                <td width="114">
                    <table width="200" border="1" >
                        <c:forEach items="${portalForm.ciudades}" var="ciudad">
                            <tr >
                                <td>${ciudad.nombre} (${ciudad.posX}:${ciudad.posY})  </td>
                            </tr>    
                        </c:forEach>
                    </table></td>
                <td>
                    <div id="contenido"></div>
                </td>
            </tr>
        </table>
        <!--
        <span>nombre usuario: ${portalForm.nombre}</span>
        <span>nombre hermandad:  ${portalForm.nombreHermandad} </span>
        
        <table>
       
    
    </table>
        -->
    </body>
</html>
